<?php
/**************************************
 * Config Class
 * Brainfucker.ru (c) Oleg Illarionov
 **************************************/

class config {
	public function arraytofile($config,$name,$way) {
		ob_start();  
		print_r($config);
		$config=ob_get_contents(); 
		ob_end_clean();
		$config=str_replace(' )',' ),',str_replace('"Array",','Array',preg_replace('/\[(\w+)\] \=\> (\w+)/', '"\1" => "\2",',$config)));
		$config='<? $'.$name.'='.$config.'?>';
		$f = fopen($way,"w");
		fwrite($f,$config);
		fclose($f);
	}
}
?>